    package com.common.retrofit.methods;

import com.common.retrofit.base.BaseMethods;
import com.common.retrofit.entity.bean.AddressBean;
import com.common.retrofit.service.HaiNingService;

import rx.Observable;
import rx.Subscriber;

    public class GetAddressMethods extends BaseMethods {

        private static GetAddressMethods m_ins = null;

        public static GetAddressMethods getInstance() {
            if (m_ins == null) {
                synchronized (GetAddressMethods.class) {
                    if (m_ins == null) {
                        m_ins = new GetAddressMethods();
                    }
                }
            }
            return m_ins;
        }

        @Override
        protected String getHttpUrl() {
            return "My/";
        }

        private HaiNingService initService() {
            return getRetrofit().create(HaiNingService.class);
        }


        public void billAddress(Subscriber<AddressBean> subscriber, int uid, String hashid ) {
            Observable observable = initService().billAddress(System.currentTimeMillis()+"",
                    "e785f07736bde4d62b77d03214d29647",uid,hashid);
            toSubscribe(observable, subscriber);
        }
    }
